package com.symria.system.listener;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.log4j.Logger;

import com.symria.framework.constant.ATTFrameWork;
import com.symria.framework.util.FrameCache;
import com.symria.system.constants.ATTSystem;


public class DefaultListener implements ServletContextListener {
	private static final Logger logger = Logger.getLogger(DefaultListener.class);
	public void contextDestroyed(ServletContextEvent arg0) {
		
	}

	public void contextInitialized(ServletContextEvent sce) {
		ATTSystem.WEB_ROOT = ATTFrameWork.WEB_ROOT=sce.getServletContext().getRealPath("");
		systemContext();
		initLog();
	}
	public void systemContext(){
        FrameCache.getInstance().initCache();
	}
	public static void initLog(){
		//DOMConfigurator.configure(Thread.currentThread().getContextClassLoader().getResource("config/log4j.xml"));
	}

}
